package com.workcell.workdata.xthings.api.feign;

import com.workcell.workdata.common.core.constant.SecurityConstants;
import com.workcell.workdata.common.core.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@FeignClient(contextId = "remoteCodeService", value = "form-data-biz")
public interface RemoteCodeService {

	/**
	 * 保存报工数据
	 * @param dto
	 * @return
	 */
	@PostMapping("/formInstance/newSaveWorkReport")
	R newSaveWorkReport(@RequestBody Map<String, Object> dto, @RequestHeader(SecurityConstants.FROM)String from);

	/**
	 * 更新功率计数据
	 */
	@PutMapping("/formInstance/newUpdateWorkReport")
	R newUpdateWorkReport(@RequestBody Map<String, Object> dto, @RequestHeader(SecurityConstants.FROM)String from);

	/**
	 * 查询报工数据
	 */
	@GetMapping("/formInstance/queryXthingsTableData")
	R queryXthingsTableData(@SpringQueryMap Map<String, Object> dto, @RequestHeader(SecurityConstants.FROM)String from);

}
